package com.czbank.financing.service.impl;


import com.czbank.financing.Entity.Account;
import com.czbank.financing.mapper.AccountMapper;
import com.czbank.financing.service.SelectAccountService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountImpl implements SelectAccountService {

    @Autowired
    private AccountMapper accountMapper;
    @Override
    public List<Account> selectAccountList() {

        return  accountMapper.TotalAccount();
    }

    @Override
    public Account selectAccountById(long id) {
        return accountMapper.selectAccountById(id);
    }

    @Override
    public int updateAccount(Account account) {
        return accountMapper.updateAccount(account);
    }

    @Override
    public int addAccount(Account account) {

        return accountMapper.addAccount(account);
    }

    @Override
    public int deleteAccount(long id) {

        return accountMapper.deleteAccount(id);
    }
}
